Routing may be either static or dynamic.
|
^RStatic^r routing is not algorithmic.
|
Routes are established manually by the network administrator before routing starts.
|
They must be changed manually whenever an internetwork topology change requires it.
|
Static routing works well when the network topology is relatively simple and the network traffic predictable.
|
Because static routing algorithms cannot react to routing changes, they are unsuitable for large-scale networks.
|
Information held in static routing tables is private, that is it is not automatically conveyed to others as part of an update process.
|
For this reason static algorithms are generally used for security where it is inappropriate to reveal everything about an internetwork.
|
Static routing allows the network administrator to specify what is advertised about restricted partitions.
@@
^RDynamic^r routing algorithms automatically adjust in real time.
|
The success of dynamic routing depends on two basic router functions:

 maintenance of a 
  routing table
|
 timely distribution of 
  knowledge
|
Routers using dynamic routing algorithms distribute knowledge by sending out update messages.
|
Update messages are controlled by the routing protocol.
|
A routing protocol describes:

 how updates are conveyed
|
 what knowledge is conveyed
|
 when the knowledge is 
  conveyed
|
 how to locate recipients of 
  the updates
|
Dynamic routers analyze the incoming routing update messages.
|
If a message indicates that a network change has occurred, the dynamic routing software updates its routing tables.
|
This re-calculates the routes and sends out routing update messages.
|
These messages filter through the network, stimulating other routers to change their routing tables.
@@
Let's look at an example which illustrates the benefits of dynamic routing over static routing.
|
Assume that host X has some packets to send to host Y.
|
It sends the first packet to router A.
|
Let's assume first that the routers are using static routing.
|
Router A follows its static knowledge and relays the packet to router D.
|
Router D in turn relays it to router C.
|
And router C delivers the packet to host Y.
|
Now assume that the path between router A and router D fails.
|
Router A will not be able to relay the packet to router D.
|
Until it is reconfigured to relay packets by way of router B communication with host Y is impossible.
|
Dynamic routing offers automatic flexibility.
|
Using dynamic routing router A knows that the preferred way to host Y is via router D and router C.
|
However, it also knows, or can find, that an alternative route exists via router B and router C.
|
When router A recognizes that the path between it and router D has failed it adjusts its routing table to make the route via router B the route to host Y.
|
It can then continue to send packets to host Y.
|
When the link is restored to service, router A can once again adjust its routing table to reinstate the route via router D as the preferred route.
@@
In very large internetworks it is not reasonable to expect that every router will know the exact route to every destination network.
|
In cases such as this, dynamic routing tables may be supplemented by static routes.
|
If a router's routing table does not have an entry for a specific destination it can direct packets along a ^Rdefault ^rroute.
|
For example, the routers within company X have specific knowledge of the topology of company X's internetwork.
|
However, maintaining knowledge of every other internetwork accessible via an internet would be practically impossible.
|
Instead, each router in company X is informed that it can reach any unknown destination by directing the packet to the internet via a specific router or routers.
@@
Most routing algorithms can be classified as either distance vector or link state.
|
The ^Rdistance vector^r routing approach determines the direction (vector) and distance to any link in the internetwork.
|
Distance vector algorithms are also known as ^RBellman-Ford^r algorithms.
|
Each router periodically sends all, or a portion of, its routing table to its neighbors.
|
For example, router B receives information from router A.
|
Router B adds a distance vector number, for example a number of hops, increasing the distance vector.
|
It then passes the routing table to its other neighbor, router C.
|
This same step-by-step process occurs in all directions between direct-neighbor routers.
|
A distance vector algorithm accumulates network distances, so it can maintain a table of internetwork distance information.
|
It does not, however, know the exact topology of an internetwork.
|
Examples of distance vector routing protocols are:

 Routing Information 
  Protocol (RIP)
|
 Cisco's Interior Gateway 
  Routing Protocol (IGRP)
@@
The ^Rlink state^r approach recreates the exact topology of either the entire internetwork, or the partition in which the router is situated.
|
The link state approach is also called the ^Rshortest path first^r (SPF) approach.
|
Link state algorithms maintain a complex database of topology information.
|
Link state algorithms flood the nodes in the internetwork with routing information.
|
However, each router sends only that portion of the routing table that describes the state of its own links.
|
In essence, link state algorithms send small updates everywhere, while distance vector algorithms send larger updates only to neighboring routers.
|
Because they converge more quickly, link state algorithms are somewhat less prone to routing loops than distance vector algorithms.
|
On the other hand, link state algorithms require more CPU power and memory than distance vector algorithms.
|
This means that link state algorithms can be more expensive to implement and support.
|
The Open Shortest Path First (OSPF) routing algorithm is an example of a link state routing algorithm.
@@
A third type of routing algorithm, called a ^Rbalanced hybrid^r routing algorithm, combines the best of both distance vector and link state.
|
The balanced hybrid routing algorithm uses distance vectors to determine the best paths to destination networks.
|
However, it differs from most distance vector algorithms by using topology changes to trigger routing database updates.
|
Like link state algorithms, balanced hybrid algorithms converge rapidly.
|
However balanced hybrid algorithms are more economical than link state algorithms in relation to bandwidth, memory and CPU overhead.
|
Examples of balanced hybrid routing protocols are:

 OSI's Intermediate System 
  to Intermediate System 
  (IS-IS)
|
 Cisco's Enhanced Interior 
  Gateway Routing Protocol 
  (Enhanced IGRP)
|
Multiprotocol routers are capable of supporting multiple independent routing and routed protocols.
|
An alternative to this is a single integrated routing algorithm, such as Enhanced IGRP.
|
Enhanced IGRP supports path selection and packet switching for IP, AppleTalk, and IPX.
|
It carries routing updates that are usable by each of these routed protocols.
|
Enhanced IGRP replaces the native routing algorithm, which is no longer required.
|
It creates a separate routing table for each of the routed protocols.
|
It saves network and router resources and simplifies the network administrator's operational tasks.
|
There is no single best routing algorithm for all internetworks.
|
Network administrators must weigh the technical and non-technical aspects of their network to determine what's best.
|
Cisco IOS software can configure whatever routing choices best fit the administrator's internetwork.
